﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;
using Volo.Abp;

namespace Himp.Platform
{
    /// <summary>
    /// 编码字典规则
    /// </summary>
    public class CodgRule : Entity<Guid>, IMultiTenant
    {
        /// <summary>
        /// 
        /// </summary>
        public Guid CodgDictId { get; set; }

        /// <summary>
        /// 分类编码
        /// </summary>
        public CodgDict CodgDict { get; set; }

        /// <summary>
        /// 规则类别
        /// </summary>
        public EnumCodgDictRuleType CodgDictRuleType { get; set; }

        /// <summary>
        /// 格式
        /// </summary>
        public string? Format { get; set; }

        /// <summary>
        /// 默认值
        /// </summary>
        public string? DefaultValue { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int Srtno { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Guid? TenantId { get; set; }

        public CodgRule()
        { }

        public CodgRule(Guid codgDictId ,EnumCodgDictRuleType codgDictRuleType
            , string? format, string? defaultValue, int? srtno)
        {
            CodgDictId = codgDictId;
            CodgDictRuleType = codgDictRuleType;
            Format = format;
            DefaultValue = defaultValue;
            Srtno = srtno ?? 0;
        }
    }
}
